﻿
@{
    ViewBag.Title = "TX";

    ViewBag.MenuType = 0;
}

<!Doctype html>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
    <title>提现 - 123123</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <script>
        !function () {
            var cw = document.documentElement.clientWidth || document.body.clientWidth, zoom = cw / 320;
            if (cw > 640) zoom = 2;
            document.write('<style id="htmlzoom">html{ font-size:' + (zoom * 50) + 'px; }</style>');
            window.addEventListener('resize', function () {
                cw = document.documentElement.clientWidth || document.body.clientWidth, zoom = cw / 320;
                if (cw > 640) zoom = 2;
                document.getElementById('htmlzoom').innerHTML = 'html{ font-size:' + (zoom * 50) + 'px; }';
            });
        }();

        function preventDefault(e) {
            e.preventDefault();
        }
    </script>
    <link rel="stylesheet" type="text/css" href="/css/base.css?v=1.11" />
    <script src="/js/zepto.min.js"></script>
    <script src="/js/touch.js"></script>
    <script src="http://www.lygzz.cn/addons/tiger_taoke/template/mobile/js/layer_mobile/layer.js"></script>
    <style type="text/css">
        body {
            background-color: #f3f3f3;
        }

        .pay {
            margin-top: .3rem;
        }

            .pay li a {
                position: relative;
                display: block;
                padding: .14rem .84rem;
                background-color: #fff;
                opacity: .6;
            }

            .pay li.cur a {
                opacity: 1;
            }

            .pay li:first-child a {
                border-bottom: solid 1px #e3e3e3;
            }

            .pay li h1 {
                font-size: .26rem;
            }

            .pay li p {
                margin-top: .08rem;
                font-size: .22rem;
                color: #999;
            }

            .pay li a:before {
                content: "";
                position: absolute;
                top: .16rem;
                left: .14rem;
                width: .52rem;
                height: .52rem;
                background: url(/images/ico.png) no-repeat -.7rem -3.6rem;
                background-size: 3.4rem;
            }

            .pay li.alpay a:before {
                background-position-x: .06rem;
            }

            .pay li.cur a:after {
                content: "";
                position: absolute;
                top: .15rem;
                right: .2rem;
                width: .5rem;
                height: .5rem;
                background: url(/images/ico.png) no-repeat .04rem -1.62rem;
                background-size: 3.4rem;
            }

        .input {
            margin-top: .3rem;
            padding: .2rem;
            background-color: #fff;
        }

            .input p {
                color: #666;
            }

            .input .num {
                position: relative;
                padding-left: .4rem;
                margin: .3rem 0 .3rem;
                font-size: .3rem;
            }

                .input .num:before {
                    content: "";
                    position: absolute;
                    top: 0;
                    left: -.08rem;
                    width: .5rem;
                    height: .5rem;
                    background: url(/images/ico.png) no-repeat -1.8rem -2.94rem;
                    background-size: 3.4rem;
                }

                .input .num input {
                    width: 100%;
                    padding: .1rem .15rem;
                    border: solid 1px #e3e3e3;
                    border-width: 0 0 1px 0;
                }

        button {
            display: block;
            width: 90%;
            height: .7rem;
            margin: .3rem auto 0;
            border: 0;
            background-color: #ea3b4c;
            color: #fff;
            border-radius: 5px;
        }

            button:active {
                background-color: #bb2f3d;
            }

            button:disabled {
                background-color: #ddd;
                color: #848689;
            }
    </style>
</head>
<body>
    <header id="header">
        <a href="javascript:history.back();" class="icon icon-goback"></a>提现
    </header>
    <div class="form">
        <form>
            <ul class="pay">
                <li class="alpay cur">
                    <a href="javascript:void(0);"><h1>支付宝</h1><p>158899</p></a>
                </li>
            </ul>
            <div class="input">
                <p>提现金额</p>
                <div class="num"><input type="number" name="money" min="0.01" step="0.01" /></div>
                <p>可用余额 <b class="balance">0</b>元</p>
            </div>
            <div style=" margin-top:.3rem; color:#ea3b4c; text-align:left;padding:5px;">1、2017-05-21 00:00:00开始系统会自动结算上个月的佣金到您的可用余额。<br>2、您的提现将会在1-3个工作日内到账，请耐心等待！</div>
            <button type="submit" disabled="disabled">确定提现</button>
        </form>
    </div>
    <script>$(".back-top").on("tap", function () { if ((typeof (myScroll) != "undefined")) { myScroll.scrollTo(0, 0, 300); } else { scrollTo(0, 0); } });//返回顶部</script>
    <script type="text/javascript">

        $(".pay li").on("tap", function () {
            $(this).siblings().removeClass("cur");
            $(this).addClass("cur");
        });

        $("input[name='money']").bind("input propertychange", function () {
            if (!$(this).val()) {
                $(".form button[type='submit']").prop("disabled", true);
            } else {
                $(".form button[type='submit']").prop("disabled", false);
            }
        });

        $("form").on("submit", function (e) {
            e.preventDefault();
            var balance = "0";
            var btn = $(".form button[type='submit']");
            if (btn.prop("disabled")) return false;
            if (parseFloat($("form input[name='money']").val()) <= 0) {
                alert("提现金额必须大于0");
                return false;
            }
            if (parseFloat($("form input[name='money']").val()) > parseFloat(balance)) {
                alert("提现金额不得大于可用余额");
                return false;
            }
            btn.prop("disabled", true);
            $.post("./index.php?i=13&c=entry&do=tx&m=tiger_wxdaili", $("form").serializeArray(), function (result) {
                alert(result.message);
                if (result.error > 0) {
                    btn.prop("disabled", false);
                }
                else {
                    location.href = "./index.php?i=13&c=entry&do=tx&m=tiger_wxdaili";
                }
            }, 'json');
            return false;
        });
    </script>
</body>
</html>
